package com.cloudkinto.controller.system;


import com.cloudkinto.base.BaseController;
import com.cloudkinto.bo.system.LoginLogQueryBo;
import com.cloudkinto.common.annotations.UserSessionRequired;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.service.system.LoginLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 登录日志 前端控制器
 * </p>
 *
 * @author hua
 * @since 2025-01-13
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "oms登录日志")
@RequestMapping("/api/admin/oms/loginLog")
public class LoginLogOmsController extends BaseController {
    private final LoginLogService loginLogService;

    @UserSessionRequired
    @PostMapping("/listPage")
    @ApiOperation(value = "登录日志查询（分页）", notes = "登录日志查询（分页）")
    public PageResult listPage(@RequestBody LoginLogQueryBo bo) {
        bo.setTenantId(getTenantId());
        bo.setCompanyId(getCompanyId());
        return loginLogService.getListPage(bo);
    }

}

